@extends('pc.v3.layouts.newapp')
@push('styles')
  <link rel="stylesheet" href="{{web_static('pc/v3/css/blog.min.css',true)}}"/>
@endpush
@section('content')
  <div class="blog-detail-list">
    <div class="blog-detail-listcont">
      <div class="crumbs">{!!\Common\Helpers\PcView\BreadcrumbBlogDetail::detail($url, $list_url, $article)!!}</div>
      <div class="comm-contentl">
        <div class="comm-contentl-left">
          <div class="comm-contentleft-title">
            <h1>{{$article->title}}</h1>
            <p>分类：<span>{{$article->classifyName}}</span><span>{{date('Y-m-d',($article->createdAt/1000))}}</span></p>
          </div>
          <div class="comm-conentleft-content">{!!$article->content!!}</div>
          <div class="comm-conentleft-share"><span>分享至</span>
            <div data-tag="share_1" class="bdsharebuttonbox"><a data-cmd="more" class="bds_more"></a><a data-cmd="qzone" class="bds_qzone"></a><a data-cmd="tsina" class="bds_tsina"></a><a data-cmd="tqq" class="bds_tqq"></a><a data-cmd="renren" class="bds_renren"></a><a data-cmd="weixin" class="bds_weixin"></a></div>
          </div>
        </div>
        <div class="comm-content-right">
          @php
            $req = new Common\Java\Cms\ResourceList();
            $blogResourceSidebar = $req->pc_blog_sidebar($city->area_code);
          @endphp
          <ul class="comm-content-rightUl">
            <li class="comm-content-rightImg"><img src="{{web_static('pc/v3/assets/blog/youner.png')}}"/></li>
            @if(is_array($blogResourceSidebar))
              @foreach($blogResourceSidebar as $sidebar)
                @php $resource = Common\Standard\Object\stdResource::instance($sidebar); @endphp
                <li><a href="{{$resource->pc_city_url_convert($city, $resource->getLinkUrl())}}" title="{{$resource->getTitle()}}"><img src="{{$resource->getImageUrl()}}@308w_230h.jpg" alt="{{$resource->getTitle()}}"/></a></li>
              @endforeach
            @endif
          </ul>
          @php
            $req = new Common\Java\Cms\ResourceList();
            $blogResourceArticle = $req->pc_blog_recommend_article($city->area_code);
          @endphp
          @if(is_array($blogResourceArticle))
            <ul class="comm-content-right-last">
              <li>
                <h3>精彩推荐</h3>
              </li>
              @foreach($blogResourceArticle as $resourceArticle)
                @php $resource = Common\Standard\Object\stdResource::instance($resourceArticle); @endphp
                <li><i>{{$loop->iteration}}</i><span><a href="{{$resource->pc_city_url_convert($city, $resource->getLinkUrl())}}" target="_blank" title="{{$resource->getTitle()}}">{{$resource->getTitle()}}</a></span></li>
              @if($loop->iteration > 10) @break @endif
              @endforeach
            </ul>
          @endif
          <div class="blog-right-last"><a href="{{seo_url(\Common\Define\Route\WebRoute::DOWNLOAD)}}" target="_blank"><img src="http://img.ishangzu.com/ishangzu/2017/06/16/17/c3ed5e7d-a549-6d5a-5652-e2bfd3d99444.jpg"/></a></div>
        </div>
      </div>
    </div>
  </div>
@endsection
@push('scripts')
  <script>
    window._bd_share_config = {
        common: {
            bdSign: 'off',//on｜off｜normal
            bdText: '{{$article->title}}',
            bdDesc: '{{$article->viceTitle}}',
            bdUrl: '{{$url->toString()}}',
            bdPic: '{{$article->mainImg}}'
        },
        share: [{
            "tag": "share_1",
            "bdSize": 32
        }]
    }
    with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=' + ~(-new Date() / 36e5)];
  </script>
  <script src="{{web_static('pc/v3/js/blog.min.js',true)}}"></script>
@endpush